Skip to main content

TickLens

The full contract can be found here

Read-Only Functions

getPopulatedTicksInWord

function getPopulatedTicksInWord(
address pool,
int16 tickBitmapIndex
) public view override returns (PopulatedTick[] memory populatedTicks);

This function retrieves the populated ticks within a word from the Sushi V3 pool for a given tickBitmapIndex. It returns an array of populated tick data, including the tick value, net liquidity, and gross liquidity.

  • It fetches the tick bitmap for the given tickBitmapIndex from the Sushi V3 pool.
  • It calculates the number of populated ticks in the word and fetches the populated tick data.
  • The function returns an array of PopulatedTick structs containing the tick value, net liquidity, and gross liquidity.

Parameters

NameTypeDescription
pooladdressAddress of the Sushi V3 pool
tickBitmapIndexint16Index of the tick bitmap from which to retrieve tick data

Returns

NameTypeDescription
populatedTicksPopulatedTick[] memoryArray of populated tick data in the tick bitmap word

Events

None

Modifiers

None